﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<ali:Get ID="Category" Object="Category" InnerID="Request.QueryString['ID']" Validate="True" />
<section data-page="category_edit" data-title="编辑类别" data-lang="<%=ContentLang%>" data-id="<%=Request.QueryString["ID"]%>" data-guid="<%=Category[ID]%>">
	<dl class="path1">
		<dt><span>您的位置：</span><a href="list.aspx?Lang=<%=ContentLang%>" target="ali-navtab">类别列表</a> → <b class="<%=ContentLang%>Font"><%=Category[Name]%></b></dt>
		<dd>
			<select data-class="<%=ContentLang%>Font" data-ali-widget="combo">
				<ali:List Mark="System" Object="Language" Source="Manager.Languages">
					<ali:Record>
						<%If Convert.ToString(Ab) == ContentLang%>
							<option value="<%=Ab%>" selected><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%Else%>
							<option value="<%=Ab%>"><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%EndIf%>
					</ali:Record>
				</ali:List>
			</select>
		</dd>
	</dl>
	<form action="?Lang=<%=ContentLang%>" class="post">
		<div class="post-body">
			<table class="post-table margin2">
				<tr>
					<th>名称：</th>
					<td><input type="text" name="Name" value="<%=Category[Name]%>" size="40" maxlength="80" class="ali-input <%=ContentLang%>Font"></td>
				</tr>
				<tr>
					<th>父类：</th>
					<td>
						<select name="ParentID" data-class="<%=ContentLang%>Font" data-tree="true" data-root="" data-ali-widget="combo">
							<option data-item="" data-parent="" value="">未指定</option>
							<ali:Tree Object="Category">
								<ali:Record>
									<%If Guid.Equals(ID, Category[ParentID])%>
										<option data-item="<%=InnerID%>" data-parent="<%=ParentInnerID%>" value="<%=ID%>" selected><%=Name%></option>
									<%Else%>
										<option data-item="<%=InnerID%>" data-parent="<%=ParentInnerID%>" value="<%=ID%>"><%=Name%></option>
									<%EndIf%>
									<%=ChildRecords%>
								</ali:Record>
							</ali:Tree>		
						</select>
					</td>
				</tr>
				<tr>
					<th>推荐：</th><td><input type="number" name="Recommend" value="<%=Category[Recommend]%>"></td>
				</tr>
				<tr>
					<th>是否显示：</th>
					<td>
						<%If Convert.ToBoolean(Category[IsDisplay])%>
							<label><input type="radio" name="IsDisplay" checked value="true">是</label>
							<label><input type="radio" name="IsDisplay" value="false">否</label>
						<%Else%>
							<label><input type="radio" name="IsDisplay" value="true">是</label>
							<label><input type="radio" name="IsDisplay" checked value="false">否</label>
						<%EndIf%>
					</td>
				</tr>
			</table>
		</div>
		<div class="post-footer"><button type="submit" class="ali-button">保 存</button><input type="hidden" name="PictureAllowedType" value="gif|jpg|jpeg|png|bmp|png"></div>
	</form>
</section>